from ultralytics import YOLO
import torch

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

m = YOLO(r"C:\Users\Administrator\Desktop\ultralytics-action\训练结果\二维码\模型5\weights\best.pt")
m.to(device)

success = m.export(format="onnx", ch=1)  # export the model to ONNX for
